package com.superquan.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @title: ApplicationContextConfig
 * @Author superQuan
 * @Date: 2022/3/31 21:34
 * @Version 1.0
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
    //@LoadBalanced   //负载均衡注解：赋予RestTemplate负载均衡的能力（轮循）
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
